<template>
	<view class="title-container">
		<view class="top">
			会员低至2元/月, 免广告、看10000+名厨视频
		</view>
		<view class="middle">
			{{menuDetail.name}}
			<view class="tags">
				<text class="tag"
					v-for="item in menuDetail.classtips"
					:key="item">{{item}}</text>
			</view>
		</view>
		<view class="bottom">
			<template v-if="isVip">
				<view class="row-item">
					<text class="vip-row-item">会员专享</text>
					<image src="../../static/img/vip-menu/huiyuan.png"
						mode=""></image>
				</view>


				<view class="row-item">
					<text>{{menuDetail.pageview | valueFilter}}</text>
					<image src="../../static/img/caipusousuo_slices/mengbanzu278.png"
						mode=""></image>
				</view>
				<view class="row-item">
					<text>{{menuDetail.collections | valueFilter}}</text>
					<image src="../../static/img/caipusousuo_slices/mengbanzu279.png"
						mode=""></image>
				</view>

			</template>



			<template v-else>

				<view class="row-item">
					<text>{{menuDetail.pageview | valueFilter}}</text>
					<image src="../../static/img/caipusousuo_slices/mengbanzu278.png"
						mode=""></image>
				</view>
				<view class="row-item">
					<text>{{menuDetail.collections | valueFilter}}</text>
					<image src="../../static/img/caipusousuo_slices/mengbanzu279.png"
						mode=""></image>
				</view>

			</template>
		</view>
	</view>
</template>

<script>
	export default {
		name: "menu-title-section",
		props: {
			// title:{
			// 	default:'菜名'
			// },
			isVip: {
				type: Boolean,
				default: false
			},
			menuDetail: {
				type: Object,

			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss"
	scoped>
	.title-container {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 750rpx;
		// height: 300rpx;
		background-color: #ffffff;
		box-sizing: border-box;
		padding: 30rpx 32rpx;
		margin-bottom: 28rpx;

		.top {
			width: 100%;
			height: 88rpx;
			line-height: 88rpx;
			text-align: center;
			font-size: 28rpx;
			color: #fff;
			background-image: linear-gradient(270deg,
					#e7b564 0%,
					#f0c379 49%,
					#e7b564 100%);
			border-radius: 16rpx;
			margin-bottom: 52rpx;
		}

		.middle {
			width: 100%;
			text-align: center;
			font-size: 34rpx;
			margin-bottom: 32rpx;

			.tags {
				display: flex;
				justify-content: center;
				align-items: center;
				flex-wrap: wrap;
				width: 100%;
				font-size: 28rpx;
				padding-top: 24rpx;

				.tag {
					width: max-content;
					height: 28rpx;
					line-height: 28rpx;
					padding: 6rpx 12rpx;
					color: #deb264;
					border: 2rpx solid #ccc;
					margin: 0 6rpx;
					margin-bottom: 12rpx;
					border-radius: $uni-border-radius-lg;
					background-color: #fbf7ef;
					border: solid 2rpx #dcb66a;
				}

			}
		}

		.bottom {
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;

			.row-item {
				// width: 334rpx;
				display: flex;
				align-items: center;
				margin-right: 30rpx;


				text {
					width: fit-content;
					font-size: 22rpx;
					font-weight: bold;
					color: #aaa;
					margin-right: 14rpx;

					&.vip-row-item {
						color: #ed6786;
					}
				}

				image {
					width: 24rpx;
					height: 24rpx;
				}
			}

		}


	}
</style>
